@extends('layouts.default')
@section('css')
    <link rel="stylesheet" href="{{asset('admin-lte/plugins/datatables/dataTables.bootstrap4.css')}}">
    {{--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">--}}
    {{--<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">--}}
@stop

@section('content')
    <div class="row">
        <div class="col-12">
            
            <div class="card">
                <div class="card-header">
                    <h3 class="card-title">用户推荐/用户收益<a class="text-primary" href="{{url('admin/user/index')}}">返回用户列表</a></h3>
                </div>
                @include('layouts.message')
                <!-- /.card-header -->
                <div class="card-body">
                    <table id="example1" class="table table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>流水ID</th>
                            <th>订单号</th>
                            <th>收益人账号</th>
                            <th>收益人昵称</th>
                            <th>贡献人手机</th>
                            <th>贡献人昵称</th>
                            <th>订单金额</th>
                            <th>收益金额</th>
                            <th>收益比例</th>
                            <th>分销等级</th>
                            <th>记录时间</th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach ($lists as $list)
                        <tr>
                            <td>{{ $list['id'] }}</td>
                            <td>{{ $list['order_sn'] }}</td>
                            <td>{{ $list['beneficiary_user_name'] }}</td>
                            <td>{{ $list['beneficiary_user_nickname'] }}</td>
                            <td>{{ $list['buy_user_name'] }}</td>
                            <td>{{ $list['buy_user_nickname'] }}</td>
                            <td>{{ $list['order_money'] }}</td>
                            <td>{{ $list['total_money'] }}</td>
                            <td>{{ $list['rate'] }}</td>
                            <td>{{ $list['level'] }}</td>
                            <td>
                                @php
                                    if ( $list['created_at']){echo date('Y-m-d H:i:s',$list['created_at'] );}else{echo '';}
                                @endphp
                            </td>
                        </tr>
                        @endforeach
                        </tbody>
                        <tfoot>
                        <tr>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                        </tr>
                        </tfoot>
                    </table>

                </div>
                <!-- /.card-body -->
            </div>
            <!-- /.card -->
        </div>
        <!-- /.col -->
    </div>

@stop

@section('script')
    <script src="{{asset('admin-lte/plugins/datatables/jquery.dataTables.js')}}"></script>
    <script src="{{asset('admin-lte/plugins/datatables/dataTables.bootstrap4.js')}}"></script>
    <script>
        $(function () {
            $("#example1").DataTable({
                "language"  : {
                    url :'https://cdn.datatables.net/plug-ins/1.10.19/i18n/Chinese.json'
                },

            });

        });


    </script>
@stop